<template>
  <div class="child">
    <h2>child</h2>
    {{ obj.name }}
  </div>
</template>
<!-- <script>
export default {
  data() {
    return {}
  },
  inject: ['obj'],
  created() {
    console.log(this.obj)
  },
}
</script> -->
<script setup>
import { inject } from 'vue'

const obj = inject('obj')
console.log(obj)
const events = inject('events')
// console.log(events)
events.show(1)
</script>
<style
  lang="scss"
  scoped
></style>
